//c++ 引用类型

#include <iostream>
using namespace std;

int main()
{
    int a = 100;
    int &b = a;
    b = 200;
    cout << a << endl;  //200

    int c[10] = {1,2,3};
    int (&d)[10] = c;
    d[0] = 666;
    cout << d[0] << endl;   //666

    int *p = &a;
    int *(&q) = p;
    cout << *p << endl; //200
    q = &c[2];
    cout << *p <<endl;  //3

    return 0;
}